#ifndef QTABLEDIALOG_H
#define QTABLEDIALOG_H

#include <QDialog>
#include "chart.h"

namespace Ui {
class QTableDialog;
}

class QTableDialog : public QDialog
{
    Q_OBJECT

public:
    explicit QTableDialog(QWidget *parent = 0,bool isTotal = false);
    ~QTableDialog();

private:
    Ui::QTableDialog *ui;
    Chart *chart = nullptr;
    bool total;

    void setTableHeader();

public:
    void createItemsARow(int rowNo,std::vector<std::pair<int,float>>&range,QString &htxt = QString("value"));
    void insertItemsARow(QTableDialog *tbl,QString &htxt);
    void *getCurTbl();

private slots:
    void on_btnToCurve_clicked();
};

#endif // QTABLEDIALOG_H
